package com.demo.job.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.Map;

/**
 * 订单服务Feign客户端
 * 用于调用订单服务的接口
 */
@FeignClient(name = "order-service", fallback = OrderFeignClientFallback.class)
public interface OrderFeignClient {

    /**
     * 取消超时订单
     * @return 取消结果
     */
    @PostMapping("/api/order/cancel-expired")
    Map<String, Object> cancelExpiredOrders();
}